package com.sc.VenusQueryBeta.model.setting.change;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.home.HomeApi;
import com.sc.VenusQueryBeta.contract.setting.change.ChangeContract;
import com.sc.VenusQueryBeta.model.bean.home.ChangeNextBean;

import io.reactivex.Observable;

/**
 * Created by SC-02 on 2018/9/19.
 * 修改密码model 继承Basemodel 并且实现契约累的model方法
 */


public class ChangeModel extends BaseModel implements ChangeContract.IChangeModel {
/**
 * 实例化对象
 */
public static ChangeModel newInstance(){
    return new ChangeModel();
}

    @Override
    public Observable<ChangeNextBean> changenext(String oldPassword, String newPassword, int registerIndex, String loginUserId) {
        return RetrofitCreateHelper.createApi(HomeApi.class, Host.HostVGSestMessageserver).changenext(oldPassword,newPassword,registerIndex,loginUserId).compose(RxHelper.<ChangeNextBean>rxSchedulerHelper());

    }
}
